﻿using System.Collections.Generic;
using System.Drawing;

namespace Model
{
    /// <summary>
    /// 碎片识别直线具体信息
    /// </summary>
    public class LinePiece
    {
        /// <summary>
        /// 黑边框
        /// </summary>
        public Rectangle RectBlack { get; set; }
        /// <summary>
        /// 需删除框
        /// </summary>
        public Rectangle RectInside { get; set; }
        /// <summary>
        /// 直线识别具体信息
        /// </summary>
        public List<LineInfo> LineXML { get; set; }
        /// <summary>
        /// 短直线最小长度
        /// </summary>
        public int MinShortLine { get; set; }
        /// <summary>
        /// 短直线内的最大断开长度
        /// </summary>
        public int MaxSLBreak { get; set; }
        /// <summary>
        /// 短直线间的最大断开长度
        /// </summary>
        public int MaxLineBreak { get; set; }
        /// <summary>
        /// 最大缩放比例
        /// </summary>
        public int MaxScale { get; set; }
        /// <summary>
        /// 最小整直线长度
        /// </summary>
        public int MinLineScale { get; set; }
        /// <summary>
        /// 黑边最小宽度
        /// </summary>
        public int MinBlackWidth { get; set; }
        /// <summary>
        /// 黑边最小高度
        /// </summary>
        public int MinBlackHeight { get; set; }
        /// <summary>
        /// 黑边最大允许断开长度
        /// </summary>
        public int MaxBlackBreak { get; set; }
        /// <summary>
        /// 是否识别黑边（0不识别，1识别）
        /// </summary>
        public int IsSearchBlack { get; set; }
        /// <summary>
        /// 二值化限制系数
        /// </summary>
        public int LimitColor { get; set; }
    }

    /// <summary>
    /// 直线信息
    /// </summary>
    public class LineInfo
    {
        /// <summary>
        /// 直线序号
        /// </summary>
        public string Id { get; set; }
        /// <summary>
        /// 直线固定向坐标
        /// </summary>
        public int A { get; set; }
        /// <summary>
        /// 直线非固定向最小坐标
        /// </summary>
        public int Bmin { get; set; }
        /// <summary>
        /// 直线非固定向最大坐标
        /// </summary>
        public int Bmax { get; set; }
        /// <summary>
        /// 是否需要更多辅助信息
        /// </summary>
        public bool IsNeedMore { get; set; }
        /// <summary>
        /// 辅助信息
        /// </summary>
        public MoreInfo MoreInfoTemp { get; set; }

    }

    /// <summary>
    /// 更多辅助信息
    /// </summary>
    public class MoreInfo
    {
        /// <summary>
        /// 辅助信息类型
        /// </summary>
        public string Type { get; set; }
        /// <summary>
        /// 辅助信息列表
        /// </summary>
        public List<Info> ListInfo { get; set; }

    }

    /// <summary>
    /// 具体单条辅助信息
    /// </summary>
    public class Info
    {
        /// <summary>
        /// 信息内容
        /// </summary>
        public string Name { get; set; }
        /// <summary>
        /// 信息的位置
        /// </summary>
        public Rectangle Location { get; set; }
        /// <summary>
        /// 附加参数
        /// </summary>
        public int Param { get; set; }
    }

    /// <summary>
    /// 直线段参数
    /// </summary>
    public class Line
    {
        /// <summary>
        /// 固定向坐标
        /// </summary>
        public int A { get; set; }

        /// <summary>
        /// 起始点
        /// </summary>
        public int B_Min { get; set; }

        /// <summary>
        /// 结束点
        /// </summary>
        public int B_Max { get; set; }
    }
}
